package com.zcf.pojo;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhouzhuang
 * @since 2018-11-29
 */
public class Code extends Model<Code> {

    private static final long serialVersionUID = 1L;

    /**
     * 验证码表
     */
    @TableId(value = "mid", type = IdType.AUTO)
    private Integer mid;
    /**
     * 验证码
     */
    private String code;
    /**
     * 有效期
     */
    private Date validity;


    public Integer getMid() {
        return mid;
    }

    public void setMid(Integer mid) {
        this.mid = mid;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getValidity() {
        return validity;
    }

    public void setValidity(Date validity) {
        this.validity = validity;
    }

    @Override
    protected Serializable pkVal() {
        return this.mid;
    }

    @Override
    public String toString() {
        return "Code{" +
        "mid=" + mid +
        ", code=" + code +
        ", validity=" + validity +
        "}";
    }
}
